package model;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

@Entity
@Table(name = "NhaXuatBan")
public class NhaXuatBan {
	private int id_NXB;
	private String tenNXB;
	private String moTaNXB;

	public NhaXuatBan(int id_NXB, String tenNXB, String moTaNXB) {
		super();
		this.id_NXB = id_NXB;
		this.tenNXB = tenNXB;
		this.moTaNXB = moTaNXB;
	}
	public NhaXuatBan(String tenNXB) {
		super();
		this.tenNXB = tenNXB;
	}
	public NhaXuatBan(){
		
	}
	@Id
	@GeneratedValue(generator = "NXB_ID_Gen", strategy = GenerationType.IDENTITY)
	@SequenceGenerator(name = "NXB_ID_Gen", sequenceName = "NXB_SEQ_ID")
	@Column(name = "ID_NXB", unique = true, nullable = false)
	public int getId_NXB() {
		return id_NXB;
	}

	public void setId_NXB(int id_NXB) {
		this.id_NXB = id_NXB;
	}

	@Column(name = "TenNXB", nullable = false)
	public String getTenNXB() {
		return tenNXB;
	}

	public void setTenNXB(String tenNXB) {
		this.tenNXB = tenNXB;
	}

	@Column(name = "MoTaNXB")
	public String getMoTaNXB() {
		return moTaNXB;
	}

	public void setMoTaNXB(String moTaNXB) {
		this.moTaNXB = moTaNXB;
	}

}
